<template>
	<view class="background">

		<view class="img">
			<image src="../../../static/images2/login/logo.png" mode="" class="logo"></image>
		</view>
		<view class="formData">
			<formData :values="passwordValues" :fields="passwordFields" :rules="passwordRules" ref="password"
				labelAlign="left">
				<template slot="slot">
					<view class="password_login" @click="passwordLogin">
						<view></view>
						<view @click="CreditorLanding">用户登录</view>
					</view>
				</template>
			</formData>
		</view>
		<view class="button_error d-f-j-c-a-i " @click="disembark">
			登录
		</view>
		
	</view>
</template>


<script>
	import FormData from '@/components/form/index'
	import {
		mapState,
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {}
		},
		components: {
			FormData
		},
		methods: {
			...mapActions({
				creditorAshore: 'LOGIN/CREDITOR_ASHORE', //债权人登录
			}),
			//登录
			disembark() {
				let flag = this.$refs.password.submit()
				if (flag) {
					    uni.showLoading({
            title: "加载中",
          });
					this.creditorAshore()
				}
			},
			CreditorLanding(){
				uni.navigateTo({
				    url: '/pages/loanee/login/index'
				});
			}
		},
		mounted() {

		},
		watch: {

		},
		computed: {
			...mapState({
				passwordFields: (state) => state.LOGIN.passwordFields,
				passwordValues: (state) => state.LOGIN.passwordValues,
				passwordRules: (state) => state.LOGIN.passwordRules,
			})
		},

		onLoad() {


		}
	}
</script>

<style scoped lang='scss'>
@import '@/common/login.scss';
</style>
/* <style>
	.uni-app--maxwidth {
		background-color: #FFFFFF !important;
	}
</style> */
